<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h = "http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:fragment>
        <c:if test="#{loginController.lin == true}" >
            <h:form>
                Thank you for logging in!
                <h:commandButton value="Logout" action="#{loginController.logout}" />
            </h:form>
        </c:if>
        <c:if test="#{loginController.lin == false}" >
            <h:form>
                <td>Email: </td>
                <td>
                    <h:inputText value="#{loginController.loginname}" />
                </td>

                <td>Password: </td>
                <td>
                    <h:inputSecret value="#{loginController.password}" />
                </td>

                <h:commandButton value="Login" action="#{loginController.login}" />
            </h:form>

            <a href="http://localhost:44459/sasanshop/registerCustomer.faces">Register now!</a>
        </c:if>
    </ui:fragment>
</html>
